package com.weifangfirecontrolformal.weifangfirecontrolformal.web.service.business.business;

import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON;
import com.weifangfirecontrolformal.weifangfirecontrolformal.common.base.BaseService;
import com.weifangfirecontrolformal.weifangfirecontrolformal.common.utils.appkit.BusinessKit;
import com.weifangfirecontrolformal.weifangfirecontrolformal.common.utils.appkit.ConfigKit;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.model.RespEntity;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.utils.file.FileStrUtil;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.utils.json.JsonKeyEdit;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.utils.requestutil.HttpRequestUtil;
import com.weifangfirecontrolformal.weifangfirecontrolformal.web.mapper.IndustryMapper;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

@Service
@Slf4j
public class BusinessService extends BaseService {

	private static final Logger logger = LoggerFactory.getLogger(BusinessService.class);

	HttpResponse httpResponse;
    @Resource
    public IndustryMapper industryMapper;

	/**
	 * 单位新增
	 * @param
	 * @return
	 */
	public RespEntity businessAdd(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());

		return restJava(jsonParam,"businessJava","businessAdd","business");
	}

	/**
	 * 单位修改
	 * @param
	 * @return
	 */
	public RespEntity businessUpdate(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());

		return restJava(jsonParam,"businessJava","businessUpdate","business");
	}

	/**
	 * 单位删除
	 * @param
	 * @return
	 */
	public RespEntity businessDelete(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());

		return restJava(jsonParam,"businessJava","businessDelete","business");
	}

	/**
	 * 单位列表
	 * @param
	 * @return
	 */
	public RespEntity businessListPage(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","businessListPage","business");
	}

	/**
	 * 单位详情
	 * @param
	 * @return
	 */
	public RespEntity detail(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","detail","business");
	}

	/**
	 * 行业列表
	 * @param
	 * @return
	 */
	public RespEntity industryList(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","industryList","business");
//        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
//        List<Industry> oneList = industryMapper.selectList(new QueryWrapper<Industry>().eq("pid","0"));
//        for(Industry one : oneList){
//            List<Industry> twoList = industryMapper.selectList(new QueryWrapper<Industry>().eq("pid",one.getId()));
//            for(Industry two : twoList){
//                List<Industry> threeList = industryMapper.selectList(new QueryWrapper<Industry>().eq("pid",two.getId()));
//                two.put("industrys",threeList);
//            }
//            one.put("industrys",twoList);
//        }
//        return RespEntity.success(oneList);
	}

	/**
	 * 单位类别列表
	 * @param
	 * @return
	 */
	public RespEntity unitCategoryList(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","unitCategoryList","business");
	}

	/**
	 * 行政区划新增
	 * @param
	 * @return
	 */
	public RespEntity regionAdd(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","regionAdd","business");
	}
	/**
	 * 行政区划删除
	 * @param
	 * @return
	 */
	public RespEntity regionDel(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","regionDel","business");
	}
	/**
	 * 行政区划编辑
	 * @param
	 * @return
	 */
	public RespEntity regionUpdate(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","regionUpdate","business");
	}

	/**
	 * 行政区划详情
	 * @param
	 * @return
	 */
	public RespEntity regionDetail(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","regionDetail","business");
	}
	/**
	 * 行政区划列表
	 * @param
	 * @return
	 */
	public RespEntity regionList(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","regionList","business");
	}
	/**
	 * 行政区划列表
	 * @param
	 * @return
	 */
	public RespEntity regionLists(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","regionLists","business");
	}
	/**
	 * 字典组查询
	 * @param
	 * @return
	 */
	public RespEntity dictList(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","dictList","business");
	}

	/**
	 * 单位不分页列表
	 * @param
	 * @return
	 */
	public RespEntity businessList(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","businessList","business");
	}
	/**
	 * 根据行政区划获取单位列表
	 * @param
	 * @return
	 */
	public RespEntity getBusinessLists(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","getBusinessLists","business");
	}
	/**
	 * 上传
	 * @param
	 * @return
	 */
	public RespEntity upload(MultipartFile file, HttpServletRequest httpServletRequest) throws IOException {
		String ip = ConfigKit.getStr("business","config");
		String methodPath = BusinessKit.getStr("upload","business");
		String domain = ip + methodPath;
		String xml = "";
		httpResponse = HttpRequest.post(domain)
				.header("Authorization", httpServletRequest.getHeader("Authorization"))
				.form("file",file.getBytes(),"file")
				.execute();
		xml = httpResponse.body();
		int state = httpResponse.getStatus();
		if(state == 401 || JSON.parseObject(xml).getInteger("code")==401) return RespEntity.expire();
		com.alibaba.fastjson.JSONObject jsonObject = JSON.parseObject(xml);
		if(jsonObject.getInteger("code")==1){
			return RespEntity.fail(jsonObject.getString("msg"));
		}
		if(jsonObject.get("data")==null){
			return RespEntity.success(jsonObject.get("msg"));
		}
		return RespEntity.success(JSONUtil.parseObj(JsonKeyEdit.jsonKeyEdit(jsonObject.getJSONObject("data").toJSONString())));
	}

	/**
	 * 下载
	 * @param
	 * @return
	 */
	public ResponseEntity<byte[]> download(String filepath, HttpServletRequest httpServletRequest) throws Exception {
		String ip = ConfigKit.getStr("business","config");
		String methodPath = BusinessKit.getStr("download","business");
		String domain = ip + methodPath;
		byte[] btImg = FileStrUtil.getImageFromNetByUrl(domain+"?filepath="+filepath);
		HttpHeaders headers = new HttpHeaders();
		// 下载显示的文件名，解决中文名称乱码问题
		String downloadFielName = new String(filepath.substring(filepath.lastIndexOf("/"),filepath.length()).getBytes("UTF-8"), "iso-8859-1");
		// 通知浏览器以attachment（下载方式）打开图片
		headers.setContentDispositionFormData("attachment", downloadFielName);
		// application/octet-stream ： 二进制流数据（最常见的文件下载）。
		headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
		return new ResponseEntity<byte[]>(btImg, headers, HttpStatus.CREATED);
	}

    /**
     * 根据消防等级分类统计机构单位数目
     * @param
     * @return
     */
    public RespEntity businessCount(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"businessJava","businessCount","business");
    }

	/**
	 * 应知应会列表
	 * @param
	 * @return
	 */
	public RespEntity shouldknowList(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","shouldknowList","business");
	}

	/**
	 * 获取所有上级行政区划接口
	 * @param
	 * @return
	 */
	public RespEntity getAllArea(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","getAllArea","business");
	}

	/**
	 * 消防主管部门列表
	 * @param
	 * @return
	 */
	public RespEntity fireDepartmentTreeList(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());

		return restJava(jsonParam,"businessJava","fireDepartmentTreeList","business");
	}

	/**
	 * 行业主管部门列表
	 * @param
	 * @return
	 */
	public RespEntity industryAuthoritiesTreeList(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());

		return restJava(jsonParam,"businessJava","industryAuthoritiesTreeList","business");
	}

	/**
	 * 删除redis里边的key
	 * @param
	 * @return
	 */
	public RespEntity removeKey(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());

		return restJava(jsonParam,"businessJava","removeKey","business");
	}

	/**
	 * @Author YangYu
	 * @Description 续费
	 * @Date Created in 14:17 2022/6/30
	 * @Param [jsonParam]
	 */

    public RespEntity renew(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","renew","business");
    }

    /**
     * @Author YangYu
     * @Description 查看单位服务是否到期
     * @Date Created in 14:17 2022/6/30
     * @Param [jsonParam]
     */

	public RespEntity checkBusinessExpire(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","checkBusinessExpire","business");
	}

	/**
	 * @Author YangYu
	 * @Description 获取仪表盘数据
	 * @Date Created in 14:17 2022/6/30
	 * @Param [jsonParam]
	 */

	public RespEntity getPressureGaugeValue(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","getPressureGaugeValue","business");
	}

	/**
	 * @Author YangYu
	 * @Description 设置仪表盘数据
	 * @Date Created in 14:17 2022/6/30
	 * @Param [jsonParam]
	 */

	public RespEntity setPressureGaugeValue(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","setPressureGaugeValue","business");
	}

	/**
	 * @Author YangYu
	 * @Description 更新企业NFC_ID
	 * @Date Created in 14:17 2022/6/30
	 * @Param [jsonParam]
	 */

	public RespEntity updateBusinessNfcID(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","updateBusinessNfcID","business");
	}

	/**
	 * @Author YangYu
	 * @Description 单位统计(根据单位类别)
	 * @Date Created in 14:17 2022/6/30
	 * @Param [jsonParam]
	 */

	public RespEntity getBusinessTypeCountList(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","getBusinessTypeCountList","business");
	}



	/**
	 * Author: xulumin
	 * Date: 2024/3/19
	 * Description: 物资新增或更新
	 */
	public RespEntity addOrUpdateMaterials(JSONObject jsonParam) {
		return restJava(jsonParam,"businessJava","addOrUpdateMaterials","business");
	}

	/**
	 * Author: xulumin
	 * Date: 2024/3/19
	 * Description: 获取物资信息列表
	 */
	public RespEntity getMaterialsList(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","getMaterialsList","business");
	}

	/**
	 * Author: xulumin
	 * Date: 2024/3/19
	 * Description: 删除物资信息
	 */
	public RespEntity delMaterials(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","delMaterials","business");
	}

	/**
	 * Author: xulumin
	 * Date: 2024/3/20
	 * Description: 获取物资信息
	 */
	public RespEntity getMaterialsInfo(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","getMaterialsInfo","business");
	}

	/**
	 * Author: xulumin
	 * Date: 2024/3/19
	 * Description: 场所新增或者更新
	 */
    public RespEntity addOrUpdatePlace(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","addOrUpdatePlace","business");
    }

	/**
	 * Author: xulumin
	 * Date: 2024/3/19
	 * Description: 场所信息列表
	 */
	public RespEntity getPlaceList(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","getPlaceList","business");
	}

	/**
	 * Author: xulumin
	 * Date: 2024/3/20
	 * Description: 获取场所信息
	 */
	public RespEntity getPlaceInfo(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","getPlaceInfo","business");
	}

	/**
	 * Author: xulumin
	 * Date: 2024/3/19
	 * Description: 删除场所信息信息
	 */
	public RespEntity delPlace(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","delPlace","business");
	}


	/**
	 * Author: xulumin
	 * Date: 2024/3/19
	 * Description: 应急专家新增或者更新
	 */
	public RespEntity addOrUpdateProfessor(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","addOrUpdateProfessor","business");
	}

	/**
	 * Author: xulumin
	 * Date: 2024/3/19
	 * Description: 应急专家信息列表
	 */
	public RespEntity getProfessorList(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","getProfessorList","business");
	}

	/**
	 * Author: xulumin
	 * Date: 2024/3/20
	 * Description: 获取应急专家
	 */
	public RespEntity getProfessorInfo(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","getProfessorInfo","business");
	}

	/**
	 * Author: xulumin
	 * Date: 2024/3/19
	 * Description: 删除应急专家
	 */
	public RespEntity delProfessor(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","delProfessor","business");
	}

	// ---------------------------应急队伍-------------------------------
	/**
	 * Author: xulumin
	 * Date: 2024/3/19
	 * Description: 应急队伍新增或者更新
	 */
	public RespEntity addOrUpdateTeam(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","addOrUpdateTeam","business");
	}

	/**
	 * Author: xulumin
	 * Date: 2024/3/19
	 * Description: 应急队伍信息列表
	 */
	public RespEntity getTeamList(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","getTeamList","business");
	}

	/**
	 * Author: xulumin
	 * Date: 2024/3/20
	 * Description: 获取应急队伍
	 */
	public RespEntity getTeamInfo(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","getTeamInfo","business");
	}

	/**
	 * Author: xulumin
	 * Date: 2024/3/19
	 * Description: 删除应急队伍
	 */
	public RespEntity delTeam(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","delTeam","business");
	}

	// ---------------------------微型消防-------------------------------
	/**
	 * Author: xulumin
	 * Date: 2024/3/19
	 * Description: 微型消防新增或者更新
	 */
	public RespEntity addOrUpdateFirestation(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","addOrUpdateFirestation","business");
	}

	/**
	 * Author: xulumin
	 * Date: 2024/3/19
	 * Description: 微型消防信息列表
	 */
	public RespEntity getFirestationList(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","getFirestationList","business");
	}

	/**
	 * Author: xulumin
	 * Date: 2024/3/20
	 * Description: 获取微型消防
	 */
	public RespEntity getFirestationInfo(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","getFirestationInfo","business");
	}

	/**
	 * Author: xulumin
	 * Date: 2024/3/19
	 * Description: 删除微型消防
	 */
	public RespEntity delFirestation(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","delFirestation","business");
	}


	/**
	 * Author: xulumin
	 * Date: 2024/3/19
	 * Description: 应急信息
	 * */
	public RespEntity getEmgInfo(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","getEmgInfo","business");
	}


	// ---------------------------微型消防-------------------------------
	/**
	 * Author: xulumin
	 * Date: 2024/3/19
	 * Description: 微型消防新增或者更新
	 */
	public RespEntity addOrUpdateCertificate(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","addOrUpdateCertificate","business");
	}

	/**
	 * Author: xulumin
	 * Date: 2024/3/19
	 * Description: 微型消防信息列表
	 */
	public RespEntity getCertificateList(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","getCertificateList","business");
	}

	/**
	 * Author: xulumin
	 * Date: 2024/3/20
	 * Description: 获取微型消防
	 */
	public RespEntity getCertificateInfo(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","getCertificateInfo","business");
	}

	/**
	 * Author: xulumin
	 * Date: 2024/3/19
	 * Description: 删除微型消防
	 */
	public RespEntity delCertificate(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","delCertificate","business");
	}


	public RespEntity getCertificateAreaList(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","getCertificateAreaList","business");
	}

    public RespEntity getRegionalInfo(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","getRegionalInfo","business");
    }


	/**
	 * Author: xulumin
	 * Date: 2024/3/19
	 * Description: 辖区行业分布情况
	 */
    public RespEntity getIndustryInfo(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","getIndustryInfo","business");
    }

	/**
	 * Author: xulumin
	 * Date: 2024/3/19
	 * Description: 辖区预警提醒
	 */
	public RespEntity getAreaWarning(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","getAreaWarning","business");
	}


	/**
	 * @Author: xulumin
	 * @ClassName: DeviceSwitchController
	 * @Date: Created in 9:23 2024.03.26
	 * @Description: 一企一档大屏查询设备报警
	 */
    public RespEntity getAreaDeviceInfo(JSONObject jsonObject) {
		jsonObject = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonObject,"businessJava","getAreaDeviceInfo","business");
    }


	/**
	 * @Author YangYu
	 * @Description 施工单位分页列表
	 * @Date Created in 11:37 2024/7/11
	 * @Param [jsonObject]
	 */

	public RespEntity constructionUnitListPage(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","constructionUnitListPage","business");
	}


	/**
	 * @Author YangYu
	 * @Description 施工单位新增、编辑
	 * @Date Created in 11:37 2024/7/11
	 * @Param [jsonObject]
	 */

	public RespEntity constructionUnitAddOrUpdate(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","constructionUnitAddOrUpdate","business");
	}


	/**
	 * @Author YangYu
	 * @Description 施工单位详情
	 * @Date Created in 11:37 2024/7/11
	 * @Param [jsonObject]
	 */

	public RespEntity constructionUnitDetails(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"businessJava","constructionUnitDetails","business");
	}
}
